<?php

/**
* @copyright   (C) 2010 iJoomla, Inc. - All rights reserved.
* @license  GNU General Public License, version 2 (http://www.gnu.org/licenses/gpl-2.0.html) 
* @author  iJoomla.com webmaster@ijoomla.com
* @url   http://www.ijoomla.com/licensing/
* the PHP code portions are distributed under the GPL license. If not otherwise stated, all images, manuals, cascading style sheets, and included JavaScript  
* are NOT GPL, and are released under the IJOOMLA Proprietary Use License v1.0 
* More info at http://www.ijoomla.com/licensing/
*/

	defined('_JEXEC') or die('Restricted Access');
	
	$show_popup = "0";
	$popup_width = "";
	$popup_height = "";
	$popup_title = "";
	$popup_content = "";
	$popup_show_freq = "";
	
	if($this->values != ""){
		$show_popup = $this->values["0"]["show_popup"];
		$popup_width = $this->values["0"]["popup_width"];
		$popup_height = $this->values["0"]["popup_height"];
		$popup_title = $this->values["0"]["popup_title"];
		$popup_content = $this->values["0"]["popup_content"];
		$popup_show_freq = $this->values["0"]["popup_show_freq"];		
	}
?>

<table width="100%">
	<tr>
		<td align="right">
			<a target="_blank" href="http://www.ijoomla.com/redirect/survey/videos/popup.htm" class="video">Video Tutorial <img src="components/com_surveys/images/icon_video.gif"></a>
		</td>
	</tr>	
</table>
	
<div id="editor122">
	<table width="100%" class="adminform">
		<tr>
			<td align="left" width="15%" nowrap="nowrap"><b><?php echo JText::_("COM_SURVEYS_SHOW_POP_UP_INVITATION"); ?> :</b></td>
			<td align="left"> 
				<table>
					<tr>
						<td>
							<table>
								<tr>
									<td>
										<input type="radio" name="show_popup" value="1" <?php if($show_popup == 1) echo 'checked'; ?> />
									</td>
									<td>										
										<?php echo JText::_("JYES"); ?>
									</td>
								</tr>
							</table>			
						</td>						
						<td>
							<table>
								<tr>
									<td>	
										<input type="radio" name="show_popup" value="0" <?php if($show_popup == 0) echo 'checked'; ?> />
									</td>
									<td>	
										<?php echo JText::_("JNO"); ?>
									</td>
								</tr>
							</table>			
						</td>
					</tr>	
				</table>		
			</td>	
		</tr>
		<tr>
			<td align="left"><b><?php echo JText::_("COM_SURVEYS_SHOW"); ?> :</b></td> 
			<td align="left"> 
				<select name="popup_show_freq">
					<option value="1" <?php if($popup_show_freq == 1) echo "selected"; ?> ><?php echo JText::_("COM_SURVEYS_ONCE_A_DAY_VALUE"); ?></option>
					<option value="7" <?php if($popup_show_freq == 7 ) echo "selected"; ?> ><?php echo JText::_("COM_SURVEYS_ONCE_A_WEEK_VALUE"); ?></option>
					<option value="30" <?php if($popup_show_freq == 30 ) echo "selected"; ?> ><?php echo JText::_("COM_SURVEYS_ONCE_A_MONTH_VALUE"); ?></option>
					<option value="91" <?php if($popup_show_freq == 91 ) echo "selected"; ?> ><?php echo JText::_("COM_SURVEYS_ONCE_EVERY_3_MONTH_VALUE"); ?></option>
					<option value="365" <?php if ($popup_show_freq == 365 ) echo "selected"; ?> ><?php echo JText::_("COM_SURVEYS_ONCE_A_YEAR_VALUE"); ?></option>
				</select>
			</td>
		</tr>	
		<tr>
			<td align="left"><b><?php echo JText::_("COM_SURVEYS_POP_UP_WIDTH");?> :</b></td> 
			<td align="left"> <input type="text" size="5" name="popup_width" value="<?php echo $popup_width; ?>" /></td>
		</tr>
		<tr>
			<td align="left"><b><?php echo JText::_("COM_SURVEYS_POP_UP_HEIGHT"); ?> :</b></td> 
			<td align="left"> <input type="text" size="5" name="popup_height" value="<?php echo $popup_height; ?>" /></td>
		</tr>
		<tr>
			<td align="left"><b><?php echo JText::_("COM_SURVEYS_POP_UP_TITLE"); ?> :</b></td> 
			<?php
				$popup_title = str_replace('"', "&quot;", $popup_title);
			?>
			<td align="left"> <input type="text" size="45" name="popup_title" value="<?php echo stripslashes($popup_title); ?>" /></td>
		</tr>	
		<tr>
			<td align="left"><b><?php echo JText::_("COM_SURVEYS_CONTENT"); ?></b></td>		
			<td align="left">		
				<?php
				$editor2  =& JFactory::getEditor();				
				$popup_content = str_replace('\\&quot;', '', $popup_content);
				echo $editor2->display('popup_content',  ''.stripslashes($popup_content) , '100%', '250px', '10', '45'); 
				?>
			</td>
		</tr>
	</table>
</div>